<html>
	<head>
		<title>数据验证配置页面</title>
		<style type="text/css">
			table.gridtable {
				font-family: verdana,arial,sans-serif;
				font-size:11px;
				color:#333333;
				border-width: 1px;
				border-color: #666666;
				border-collapse: collapse;
			}
			table.gridtable th {
				border-width: 1px;
				padding: 8px;
				border-style: solid;
				border-color: #666666;
				background-color: #dedede;
			}
			table.gridtable td {
				border-width: 1px;
				padding: 8px;
				border-style: solid;
				border-color: #666666;
				background-color: #ffffff;
			}
		</style>
	</head>
	<body>
		<form id="Frm" action="{:U('Handle')}" method="post">
			<table class='gridtable'>
				<tr>
					<th>数据列</th>
					<th>数据类型</th>
					<th>非空项</th>
					<th>条件1</th>
					<th>条件2</th>
					<th>条件3</th>
				</tr>
				<foreach name="fields" key="k" item="v">
					<tr>
						<td>{$k}</td>
						<td>
							<if condition="$v==1">
								字符
							</if>
							<if condition="$v==2">
								日期
							</if>
							<if condition="$v==3">
								数字
							</if>
						</td>
						<td>
							<input name="{$k}_Empty" type="checkbox" value="true">非空
						</td>
						<!-- 字符串区 -->
						<if condition="$v==1">
							<td>
								<select name="{$k}_type" id="">
									<option></option>
									<option value="phone">手机号码</option>
									<option value="email">邮箱</option>
								</select>
							</td>
							<td>
								<select name="{$k}_length" id="length">
									<option></option>
									<option value="length">长度</option>
								</select>
								Min<input type="text" name="{$k}_length_min" value="0">
								Max<input type="text" name="{$k}_length_max" value="100">
							</td>
							<td>
								<select name="{$k}_same">
									<option></option>
									<option value="same">相同</option>
									<option value="different">不相同</option>
								</select>
								Name<input type="text" name="{$k}_name">
							</td>
						</if>
						<!-- 数字区 -->
						<if condition="$v==3">
							<td>
								<select name="{$k}_type" id="">
									<option></option>
									<option value="">整数</option>
									<option value="">小数</option>
								</select>
							</td>
							<td>
								<select name="{$k}_lr1" id="">
									<option></option>
									<option value="lg">></option>
									<option value="rg"><</option>
									<option value="le">>=</option>
									<option value="re"><=</option>
								</select>
								<input type="text" name="{$k}_lr1_input">
							</td>
							<td>
								<select name="{$k}_lr2" id="">
									<option></option>
									<option value="lg">></option>
									<option value="rg"><</option>
									<option value="le">>=</option>
									<option value="re"><=</option>
								</select>
								<input type="text" name="{$k}_lr2_input">
							</td>
						</if>
					</tr>
				</foreach>
			</table>
			<input type="submit" value="保存">
		</form>
	</body>
</html>